/**
 * 抖音关注：程序员三丙
 * 知识星球：https://t.zsxq.com/j9b21
 */
package sanbing.example.dylike.infrastructure.queue.provider;

import jakarta.annotation.PostConstruct;
import org.springframework.stereotype.Service;
import sanbing.example.dylike.infrastructure.queue.QueueProducer;

@Service
public class CoreQueueProducerProvider implements QueueProducerProvider {

    private final QueueFactory queueProvider;
    private QueueProducer eventClickhouse;

    public CoreQueueProducerProvider(QueueFactory queueProvider) {
        this.queueProvider = queueProvider;
    }

    @PostConstruct
    public void init() {
        this.eventClickhouse = this.queueProvider.createToClickHouseMsgProducer();
    }

    @Override
    public QueueProducer getEventClickhouseMsgProducer() {
        return eventClickhouse;
    }

}
